import Vue from "vue";
import Vuex from "vuex";

import createPersistedState from "vuex-persistedstate";

const debug = process.env.NODE_ENV !== "production";

Vue.use(Vuex);

import * as actions from "./actions";
import * as mutations from "./mutations";
import * as getters from "./getters";

const store = new Vuex.Store({
  strict: debug,
  actions,
  mutations,
  getters,
  state: {
    auth: null,
    layout: {
      navPos: "left", //top, bottom, left, right, false
      toolbar: "bottom", //top, bottom, false
      footer: true, //above, below, false
      boxed: false, //true, false
      roundedCorners: false, //true, false
      viewAnimation: "fade-top" // fade-left, fade-right, fade-top, fade-top-in-out, fade-bottom, fade-bottom-in-out, fade, false
    },
    splashScreen: true,
  },
  plugins: [createPersistedState()]
});

export default store;
